/// <summary>
/// 用户类
/// </summary>
class Person
{
    public string name;
    public int age;
    /// <summary>
    /// 说话
    /// </summary>
    public void chat()
    {
        Console.WriteLine("I'm" + name);
    }
}

Person xiaoming = new Person();
xiaoming.name = "小明";
xiaoming.age = 18;

Person xiaogang = xiaoming;
xiaogang.name = "小刚";
xiaogang.age = 20;

xiaoming.chat();
Console.WriteLine(xiaoming.age);